﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace BasicFramework.Helper
{
    public static class ExtensionMethods
    {

        [DebuggerStepThrough]
        public static bool HasInterface(this Type type, Type interfaceType)
        {
            Type[] array = type.FindInterfaces(
                delegate(Type typeObj, Object criteriaObj)
                {
                    return typeObj.Equals((Type)criteriaObj);
                },
                interfaceType
            );
            return array.Length > 0;
        }
    }
}
